from django.urls import path, include

from . import views

urlpatterns = [

    # 1. 获取推荐的招聘信息列表 Path： GET  /recruits/search/recommend/
    path('recruits/search/recommend/', views.RecruitListGenericView.as_view()),

    # 2 . 获取最新的招聘信息列表 Path： GET  /recruits/search/latest/
    path('recruits/search/latest/', views.RecruitnewListGenericView.as_view()),

    # 3. 获取热门企业列表      Path： GET  /enterprise/search/hotlist/
    path('enterprise/search/hotlist/', views.EnterpriseListGenericView.as_view()),

    # 4 . 获取热门城市  Path： GET   /city/hotlist/
    path('city/hotlist/', views.CityListView.as_view()),

    # 5 . 搜索某个职位          Path： POST  /recruits/search/city/keyword/
    path('recruits/search/city/keyword/', views.SearchRecruitListView.as_view()),


    ## 6 . 获取职位详情信息      Path： GET   /recruits/{id}/
    path('recruits/<int:pk>/', views.GetRecruitListView.as_view()),

    # 7 . 增加某个职位访问量   Path： PUT  /recruits/{id}/visit/
    path('recruits/<int:pk>/visit/', views.AddRecruitViewSet.as_view()),

    # 8. 收藏或者取消收藏职位  Path： POST /recruits/{id}/collect/
    path('recruits/<int:pk>/collect/', views.CollectecruitAPIView.as_view()),
    # 8. 收藏或者取消收藏职位  Path： POST /recruits/{id}/collect/
    path('recruits/<int:pk>/cancelcollect/', views.CancelcollectecruitAPIView.as_view()),
    # /recruits/{id}/visit/
    path('recruits/<int:pk>/visit/', views.VisitAPIView.as_view()),
    # 9. 获取企业详情信息     Path： GET /enterprise/{id}/
    path('enterprise/<int:pk>/', views.EnterpriseAPIView.as_view()),

    # 10 . 增加企业的访问量      Path： PUT   /enterprise/{id}/visit/
    path('enterprise/<int:pk>/visit/', views.EnterprisevisitAPIView.as_view()),

    # 11 . 收藏公司或者取消收藏公司,后台会自行动态判断   Path： POST /enterprise/{id}/collect/
    path('enterprise/<int:pk>/collect/', views.CollectEnterpriseAPIView.as_view()),
    path('enterprise/<int:pk>/cancelcollect/', views.CancelcollectEnterpriseAPIView.as_view()),



]

